package com.ecco.persistent;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "acc_ob_col", catalog = "ecco_demo", uniqueConstraints = {})

public class AccObCol implements java.io.Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 9029823801712464794L;

	//	 Fields
	private Integer aoc_id;
	private Account account;
	private Objects objects;
	private Colour colour;
	private String comment;

	// Constructors
	public AccObCol() { 	}
	
	/** minimal constructor */
	public AccObCol(Integer aoc_id) {
		this.aoc_id = aoc_id;
	}
	
	/** full constructor */
	public AccObCol(Integer aoc_id, Account account, Objects objects, Colour colour, String comment) {
		this.aoc_id = aoc_id;
		this.account = account;
		this.objects = objects;
		this.colour = colour;
		this.comment = comment;
	}
	
	//	 Property accessors
	@Id
	@GeneratedValue
	@Column(name = "AOC_ID")
	public Integer getAoc_id() {
		return this.aoc_id;
	}
	
	public void setAoc_id(Integer aoc_id) {
		this.aoc_id = aoc_id;
	}
	
	@ManyToOne(optional=false)
	@JoinColumn(name = "acc_id")
	public Account getAccount() {
	return account;
	}
	
	public void setAccount(Account account) {
	this.account = account;
	}

	@ManyToOne(optional=false)
	@JoinColumn(name = "ob_id")
	public Objects getObjects() {
	return objects;
	}
	
	public void setObjects(Objects objects) {
	this.objects = objects;
	}
	
	@ManyToOne(optional=false)
	@JoinColumn(name = "col_id")
	public Colour getColour() {
	return colour;
	}
	
	public void setColour(Colour colour) {
	this.colour = colour;
	}
	
	@Column(name = "COMMENT", unique = false, nullable = true, insertable = true, updatable = true, length = 300)
	public String getComment() {
		return comment;
	}
	
	public void setComment(String comment) {
		this.comment = comment;
	}
	
}
